import MembershipList from "@/components/lists/membershipList/MembershipList";
import style from "./style.module.scss";
import EfficiencyFunnel from "../echarts/EfficiencyFunnel";
import Takeout from "../echarts/TakeoutRing";
import { Statistic } from "antd";
import type { StoreInfo } from "@/Interface/StoreInfoInterface";
import { useMonthStore } from "@/stores/monthStore";
import { useBasicDataStore } from "@/stores/basicDataStore";


export default function Efficiency() {

  const basicData = useBasicDataStore(status => status.basicData) as StoreInfo
  const curMonth = useMonthStore(status => status.month)
  const staffCount = basicData.monthlyData[curMonth - 1].staffCount

  return (
    <>
      <div className={`${style.size} ${style.efficiency}`}>
        <div className={style.content}>
          <MembershipList />
          <div className={style.bottom}>
            <div className={style.left}>
              <Statistic title="服务人员数量" value={staffCount} />
              <div className={style.takeout}>
                <h4>外卖占比</h4>
                <Takeout />
              </div>
            </div>
            <div className={style.right}>
              <EfficiencyFunnel />
            </div>
          </div>
        </div>
      </div>
    </>
  )
}
